package it.geosolutions.geoserver.rest.vgis;


/**
 * @author chenxw
 * @version 1.0
 * @date 2021/11/8 15:11
 */
public class FileUtils {



    public static String getFileNameRemoveSubfix(String fileName){
        String returnName="";
        int dot = fileName.lastIndexOf('.');
        if ((dot >-1) && (dot < (fileName.length() - 1))) {
            returnName=fileName.substring(0,dot);
        }
        return returnName;
    }

    public static String getFileNameRemoveSubfixAddUUid(String fileName){
        String returnName="";
        int dot = fileName.lastIndexOf('.');
        if ((dot >-1) && (dot < (fileName.length() - 1))) {
            returnName=fileName.substring(0,dot);
        }
        returnName=returnName+"_"+String.valueOf(System.currentTimeMillis());
        return returnName;
    }


}
